//
//  FRNavigationItemButton.m
//  FaceRecognition
//
//  Created by Sylar on 2016/11/30.
//  Copyright © 2016年 Sylar. All rights reserved.
//

#import "FRNavigationItemButton.h"

@implementation FRNavigationItemButton

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    UITouch *touch = [touches anyObject];
    CGPoint previousPoint = [touch previousLocationInView:self];
    
    // 只可响应在button frame内的点击事件
    if (previousPoint.x > -10 && previousPoint.x < (self.width+20) && previousPoint.y > -10 && previousPoint.y < (self.height+10)) {
        [super touchesBegan:touches withEvent:event];
    }
}

@end
